//
//  ViewController.m
//  UI03_Homework_彩虹灯
//
//  Created by Scott on 16/5/6.
//  Copyright © 2016年 Scott. All rights reserved.
//

#import "ViewController.h"
#import "RainbowView.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    
    [self createSubviews];
}



- (void)createSubviews {

    RainbowView *view1 = [[RainbowView alloc] initWithFrame:CGRectMake(20, 20, 100, 100) numberOfView:5 duration:0.1];
    
    [self.view addSubview:view1];
    [view1 release];
    
    RainbowView *view2 = [[RainbowView alloc] initWithFrame:CGRectMake(120, 120, 200, 200) numberOfView:8 duration:0.1];
    
    [self.view addSubview:view2];
    [view2 release];
    
    
    
}


@end
